package com.sky.controller.user;

import com.sky.result.Result;
import com.sky.service.SetmealService;
import com.sky.service.impl.UserSetmealServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserSetmealController {

    @Autowired
    private UserSetmealServiceImpl userSetmealService;

    @GetMapping("/user/setmeal/list")
    public Result userSetmealList(String categoryId) {
        List list = userSetmealService.userSetmealList(categoryId);
        return Result.success(list);
    }

    @GetMapping("/user/setmeal/dish/{id}")
    public Result userSetmealDish(@PathVariable Integer id) {
        List list = userSetmealService.userSetmealDish(id);
        return Result.success(list);
    }
}
